<!DOCTYPE html>
<html>
<header>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script src="assets/js/echarts.min.js"></script>
	<script src="assets/js/vintage.js"></script>
	<script type="text/javascript" src="assets/js/jquery.min.js"></script>	
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="assets/plugin/bootstrap/css/bootstrap.min.css">

	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script type="text/javascript" src="assets/plugin/bootstrap/js/bootstrap.min.js"></script>	
	<script type="text/javascript" src="assets/js/vue.min.js"></script>
	<script type="text/javascript" src="assets/js/url.min.js"></script>
	<link rel="stylesheet" type="text/css" href="assets/plugin/calendar/calendar.min.css">
	<script type="text/javascript" src="assets/plugin/calendar/calendar.min.js"></script>

	<script type="text/javascript">
		var _ddoctor = {
			//请求数据接口
			apiUrl : 'http://api.ddoctor.cn/s',

			//请求数据接口的参数
			params : {
 				startTime: getQueryString('startTime') || '2017-10-07',
 				endTime: getQueryString('endTime') || '2017-10-17',
 				type: getQueryString('type') || 0,
 				actId: getQueryString('actId') || 20201,
 				clientsn: getQueryString('clientsn') || 'patient', 
 				doctorId: getQueryString('doctorId') || 0,
 				patientId: getQueryString('patientId') || 12129353,
 				userType: getQueryString('userType') || 1,
 				isFirst: getQueryString('isFirst') || 1,
 				sourceType: getQueryString('sourceType') || 0
			},
			username : getQueryString('username') || '',
		};

		function getQueryString(name) {
     		var reg = new RegExp("(^|&)" + name +"=([^&]*)(&|$)");
     		var r = window.location.search.substr(1).match(reg);
     		if(r!=null) {
     			return  unescape(r[2]);
     		}
     		return null;
		}	
		var startTime=url("?startTime")
		var endTime=url("?endTime");
		var type=url("?type");
		var actId=url("?actId");
		var clientsn=url("?clientsn");
		var doctorId=url("?doctorId");
		var patientId=url("?patientId");
		var userType=url("?userType");
		var isFirst=url("?isFirst");
		var sourceType=url("?sourceType");
		var urlname=url("?os");
		if(urlname!=null){
			window.location.href="iosindex.html?startTime="+startTime+"&endTime="+endTime+
			"&type="+type+"&actId="+actId+"&clientsn="+clientsn+"&doctorId="+doctorId+
			"&patientId="+patientId+"&userType="+userType+
			"&isFirst="+isFirst+"&sourceType="+sourceType+"&os="+urlname;
		}
	</script>
</header>

<body style="background-color: rgba(254,248,239,1)">
	<div id="main" class="container-fluid">
		<div class="row">
			<div class="col-xs-5 col-md-2">
				<div class="input-group">
				  	<input type="text" id="start-date" v-model="params.startTime"  class="form-control calendars" format="yyyy-mm-dd" v-bind:start-date="params.startTime">
				  	<span class="input-group-addon">
					<i class="glyphicon glyphicon-calendar"></i>
					</span>
				</div>
			</div>

			<div class="col-xs-5 col-md-2">
				<div class="input-group">
				  	<input type="text" id="end-date" v-model="params.endTime" class="form-control calendars" format="yyyy-mm-dd" v-bind:start-date="params.endTime">
				  	<span class="input-group-addon">
					<i class="glyphicon glyphicon-calendar"></i>
					</span>
				</div>
			</div>			

			<div class="col-xs-1 col-md-1">
				<button  type="button" class="btn btn-primary" v-on:click="getGlucometerData">确定</button>
			</div>
		</div>
		<div id="iechart" v-bind:style="myStyle" class="row"></div>	
	</div>
	<script type="text/javascript" src="assets/js/main.js?v=1.2"></script>
</body>
</html>